package reflect;

import java.io.IOException;

public  final  class Person extends BaseClass implements java.io.Serializable,ITest{
    //成员变量
    private String name;
    static  int age=30;
    protected String address;
    public String message;


    //以下声明与通过反射获取构造方法信息测试
    //Constructor1:该返回类型指定参数列表的public构造方法
    public Person(){
    }
    //Constructor2
    private Person(String name) {
        this.name = name;
    }
    //Constructor3
    protected Person(String name, String address, String message) {
        System.out.println("调用了Person的String,String,String构造方法");
        this.name = name;
        this.address = address;
        this.message = message;
    }
    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
    public String getName()throws Exception {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    static final int getAge(){
        return age;
    }
    protected String getAddress(){
        return address;
    }
    private void silentMethod(String test)throws IOException,NullPointerException {
        System.out.println("这是悄悄话。。。。。");
    }


}
